import axios from 'axios';

// 项目信息
export interface ProjectRecord {
  id: string;
  name: string;
  code: string;
  budget: string;
  type: number;
  protemId?: string;
  planStart: string;
  planEnd: string;
  description?: string;
  rangeDate?: Array<string>; // 项目时间临时字段
  actualEnd?: string;
  actualStart?: string;
  createBy?: string;
  createDate?: string;
  updateBy?: string;
  updateDate?: string;
  deleteFlag?: number;
  isTemplate?: number;
}

// 查询项目详情
export function queryProjectDetail(params: object) {
  return axios.get('/cde-collaboration/project/detail', {
    params,
  });
}

// 编辑项目
export function updateProject(data: ProjectRecord) {
  return axios.post('/cde-collaboration/project/update', data);
}
